package com.cskaoyan.mapper;

import com.cskaoyan.bean.bo.TopicBatchDeleteBo;
import com.cskaoyan.bean.bo.TopicDeleteBo;
import com.cskaoyan.bean.bo.TopicUpdateBo;
import com.cskaoyan.bean.param.BaseParam;
import com.cskaoyan.bean.po.TopicCreatePo;
import com.cskaoyan.bean.po.TopicPo;
import com.cskaoyan.bean.po.TopicReadTopicPo;
import com.cskaoyan.bean.po.TopicUpdatePo;
import com.cskaoyan.bean.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 陈慧颖
 * @time: Created by chy on 2022/6/4 23:07
 */
public interface TopicMapper {

 List<TopicPo> queryAll(@Param("baseParam") BaseParam baseParam, String title, String subtitle);

    int createOneTopic(@Param("topicCreatePo") TopicCreatePo topicCreatePo);

    int delete(@Param("topicDeleteBo") TopicDeleteBo topicDeleteBo);

 // 此处复用了topicUpdateBo对象; 没有去新建topicUpdatePo
    int updateOneTopic(@Param("topicUpdatePo") TopicUpdatePo topicUpdatePo);

 TopicReadTopicPo readByTopicId(@Param("id") Integer id);

    TopicReadGoodsVo readByGoodsId(@Param("goodsId") Integer goodsId);

    // int batchDelete(@Param("topicBatchDeleteBo") TopicBatchDeleteBo topicBatchDeleteBo);
}
